<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>导入单个信息</title>
<script type="text/javascript">
      
      function back(){
    	  window.location.href="groupIndex";  
      }
      function check(){
      	var MEMBER_NAME=document.getElementById("member_Name").value;
      	var MEMBER_EMAIL=document.getElementById("member_Email").value;
      	var MEMBER_PHONE=document.getElementById("member_Phone").value;
      	if (MEMBER_NAME==""||MEMBER_NAME.length>20){
      		alert ("姓名输入错误，请重新输入");
      		return false;
      	}
      	else if (MEMBER_EMAIL==""||MEMBER_EMAIL.length>50){
        	alert ("邮箱长度错误，请重新输入");
        	return false;
        	}
      	else if (!/^\w+([-+.]\w*)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(MEMBER_EMAIL)){
    		alert("邮箱格式错误，请重新输入");
    		return false; //非法email格式
    	}

        else if (MEMBER_PHONE==""||MEMBER_PHONE.length>11){
            alert ("号码输入错误，请重新输入");
        	return false;
        	}
        else{
        	return true;
            }
        }


</script>

</head>
<body>
<form action="savemember" method="post" name="form2">
 <input type="hidden"  name="AddMember.GROUP_ID" value="${obj.GROUP_ID}">
<table>
<tr>
   <td>导入单个信息</td>
</tr>
<tr>
</tr>
<tr>
</tr>
   <tr>
       <td colspan="2">姓名<input type="text" name="AddMember.MEMBER_NAME" id="member_Name"></td>
   </tr>
   <tr >     
       <td colspan="2">邮箱<input type="text" name="AddMember.MEMBER_EMAIL" id="member_Email"></td>
   </tr>
   <tr >     
       <td colspan="2">手机<input type="text" name="AddMember.MEMBER_PHONE" id="member_Phone"></td>    
   </tr>
  
   <tr>   
       <td> <input type="submit" value="确定"  onclick="return check();"> </td>
       <td> <input type="button" value="返回"  onclick="back();"></td>
   </tr>
</table>
</form>
</body>
</html>